package demoxsgl_300.com.jj0588;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import demoxsgl_300.com.jj0588.base.BaseActivity;


/**
 * 闪屏页面
 */
public class Splash_Activity extends BaseActivity {


    private static final int GO_HOME = 1000;
    // 延迟3秒
    private static final long SPLASH_DELAY_MILLIS = 1000;
    /**
     * Handler:跳转到不同界面
     */
    private Handler mHandler = new Handler() {

        @Override
        public void handleMessage(Message msg) {
            switch (msg.what) {
                case GO_HOME:
                    startActivity(new Intent(Splash_Activity.this, MUluActivity.class));
                    finish();
                    break;
            }
            super.handleMessage(msg);
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash_);
//        WifiAPUtil.getInstance(Splash_Activity.this)
//                .turnOnWifiAp("CCCC", "88888888",  WifiAPUtil.WifiSecurityType.WIFICIPHER_WPA2);
//         WifiUtils.openWifi(true);
        //延迟3秒
        mHandler.sendEmptyMessageDelayed(GO_HOME, SPLASH_DELAY_MILLIS);
    }
}
